<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="icon" href="images/favicon.ico" />
    <link rel="canonical" href="http://bookshelfjs.org" />
    <title>Bookshelf.js | Associations</title>
    <!--
    ._.                                                      ._.
    | |    ______             _        _          _  __      | |
    | |    | ___ \           | |      | |        | |/ _|     | |
    | |    | |_/ / ___   ___ | | _____| |__   ___| | |_      | |
    | |    | ___ \/ _ \ / _ \| |/ / __| '_ \ / _ \ |  _|     | |
    | |    | |_/ / (_) | (_) |   <\__ \ | | |  __/ | |       | |
    | |____\____/_\___/_\___/|_|\_\___/_|_|_|\___|_|_|_______| |
    |                                                          |
    \________\  /__________________________________\  /________/
              \/                                    \/
    -->
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Import fonts from Open Font Library -->
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/carlito" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/average-mono" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" media="screen" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>

    <link type="text/css" rel="stylesheet" href="styles/main.css">
  </head>
  <body class="minami">
    <nav class="main-navbar">
      <a href="index.html"><img class="nav-logo" src="images/bookshelf-icon-inverted.svg" />Bookshelf.js
</a>
      <label for="show-menu" class="show-menu">
        <i class="fa fa-bars fa-lg" aria-hidden="true"></i>
      </label>
      <input type="checkbox" id="show-menu" role="button" checked>
      <ul id="menu">
        
          <li>
            <a href="tutorials.html" class="active"><i class="fa fa-file-text" aria-hidden="true"></i>Guides
</a>
          </li>
        
        
          <li>
            <a href="api.html"><i class="fa fa-book" aria-hidden="true"></i>API Reference
</a>
          </li>
        
        <li>
          <a href="https://github.com/bookshelf/bookshelf"><span class="fa fa-github"></span></a>
        </li>
      </ul>
    </nav>

    <div class="page-content">
      
        <nav class="sidebar">
          
            <h2>Guides</h2>
            <ul class="tutorials"><li><a href="tutorial-associations.html">Associations</a><ul class="tutorials"><li><a href="tutorial-one-to-one.html">One-to-one</a><ul class="tutorials"></ul></li><li><a href="tutorial-one-to-many.html">One-to-many</a><ul class="tutorials"></ul></li><li><a href="tutorial-many-to-many.html">Many-to-many</a><ul class="tutorials"></ul></li><li><a href="tutorial-polymorphic.html">Polymorphic</a><ul class="tutorials"></ul></li></ul></li><li><a href="tutorial-models.html">Models</a><ul class="tutorials"><li><a href="tutorial-events.html">Events</a><ul class="tutorials"></ul></li><li><a href="tutorial-parse-and-format.html">Parse and Format</a><ul class="tutorials"></ul></li></ul></li></ul>
          
        </nav>
      

      <div class="main-container tutorial">
        <div class="main-column">
          

          <article class="tutorial">
  <h2>Associations</h2>
  <section class="content"><p>Bookshelf handles one-to-one, one-to-many, and many-to-many associations by defining relationships on models.</p></section>
  
    <h3>More details about this topic on the following sections:</h3>
    <nav>
      <ul>
        
          <li><a href="tutorial-one-to-one.html">One-to-one</a></li>
        
          <li><a href="tutorial-one-to-many.html">One-to-many</a></li>
        
          <li><a href="tutorial-many-to-many.html">Many-to-many</a></li>
        
          <li><a href="tutorial-polymorphic.html">Polymorphic</a></li>
        
      </ul>
    </nav>
  
</article>

        </div>
      </div>
    </div>

    <footer>
      <div>
        Documentation generated by
        <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
        
          on
          June 7, 2020
        
      </div>
    </footer>

    <script>prettyPrint();</script>
    <script src="scripts/linenumber.js"></script>
    <script src="scripts/main.js"></script>
  </body>
</html>